// component/ui/z-tabs/index.js
const path = '../z-tag/z-tag'
Component({
  relations: {
    [path]: {
      type: 'descendant',
      linked: function (target) {},
      linkChanged: function (target) {},
      unlinked: function (target) {}
    }
  },

  /**
   * 组件的属性列表
   */
  properties: {
    column: {
      type: Number,
      value: 1,
    },
  },

  /**
   * 组件的初始数据
   */
  data: {

  },

  /**
   * 组件的数据监听
   */
  observers: {
    isExpand(isExpand) {
      let row = 0
      if (isExpand) {
        row = Math.ceil(this.data.list.length / this.data.column)
      }
      this.setData({
        totalHeight: row * 76
      })
    }
  },

  /**
   * 组件的方法列表
   */
  methods: {

  }
})